package com.pig4cloud.pig.demo.Service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.pig.demo.Mapper.PurchaseMapper;
import com.pig4cloud.pig.demo.Service.PurchaseService;
import com.pig4cloud.pig.demo.feign.Entity.Purchase;
import com.pig4cloud.pig.demo.feign.vo.PurchaseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase> implements PurchaseService {
    @Autowired
    private PurchaseMapper purchaseMapper;

    @Override
    public int insertPurchase(Purchase purchase) {
        return purchaseMapper.insert(purchase);
    }

    @Override
    public List<PurchaseVO> queryPurchaseList(Long id){
        return purchaseMapper.queryPurchaseList(id);
    }
}
